package com.martian.common.util;

import org.apache.ibatis.scripting.xmltags.SetSqlNode;

/**
 * @author martian
 * @version V1.0.0
 * @Description 将sql语句中的单引号替换
 * @date 2023-04-26 16:38
 */

public class SqlQuotationUtil {
    public static String replaceQuotation(String sql){
        if (sql.indexOf("'")>-1) {
            System.out.println("sss");
            sql = sql.replaceAll("'","''");
            return sql;
        }else{
            return sql;
        }
    }

    public static void main(String[] args) {
        System.out.println(SqlQuotationUtil.replaceQuotation("TheWooden Man's Bride"));
    }
}
